import Vue from 'vue'
import App from './App.vue'

//引入路由器router
import router from "@/router/index"
//引入Vuex store
import store from '@/store/index'

Vue.config.productionTip = false

import '@/plugins/element-ui'

//引入全局组件Navigation
import Navigation from '@/components/Navigation/index'
// eslint-disable-next-line vue/multi-word-component-names
Vue.component('Navigation',Navigation)

//内置过渡动画
// fade/zoom 等
import 'element-ui/lib/theme-chalk/base.css';
// collapse 展开折叠
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';

Vue.component(CollapseTransition.name, CollapseTransition)
//注册全局接口api
import * as API from '@/api'

new Vue({
  render: h => h(App),
  beforeCreate() {
    //接入全局事件总线
    Vue.prototype.$bus=this;
    //接入所有api接口
    Vue.prototype.$API=API;
  },
  //在入口文件中注册路由器
  router,
  //注册Vuex store ，注册之后vm中会多一个属性，$store
  store
}).$mount('#app')
